import request from '@/utils/request'

// 查询入库单列表
export function listWarehouse(query) {
  return request({
    url: '/wms/warehouse/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/wms/warehouse/initBean',
        method: 'post'
    })
}

// 查询入库单详细
export function getWarehouse(id) {
  return request({
    url: '/wms/warehouse/' + id,
    method: 'get'
  })
}

// 新增入库单
export function addWarehouse(data) {
  return request({
    url: '/wms/warehouse',
    method: 'post',
    data: data
  })
}

// 修改入库单
export function updateWarehouse(data) {
  return request({
    url: '/wms/warehouse',
    method: 'put',
    data: data
  })
}

// 删除入库单
export function delWarehouse(id) {
  return request({
    url: '/wms/warehouse/' + id,
    method: 'delete'
  })
}

export function printProgresses() {
  return request({
    url: '/app/printProgresses',
    method: 'get'
  })
}

export function finishPrint(uuid) {
  return request({
    url: '/app/finishPrint/'+uuid,
    method: 'get'
  })
}
